<template>
  <el-dialog
    title="详情"
    :visible.sync="dialogVisible"
    :before-close="close"
    width="30%"
  >
    <el-descriptions :column="1">
      <el-descriptions-item label="转接类型">{{ typeList[form.transferType] }}</el-descriptions-item>
      <div class="titleStyle">
        <span>基本信息</span>
      </div>
      <el-descriptions-item label="姓名">{{ form.partyMemberName }}</el-descriptions-item>
      <el-descriptions-item label="转入党组织">{{ form.transferredToPartyOrgName }}</el-descriptions-item>
      <el-descriptions-item label="党费缴至">{{ form.partyDuesPaidTo }}</el-descriptions-item>
      <div class="titleStyle">
        <span>转接信息</span>
      </div>
      <el-descriptions-item label="转出党组织">{{ form.transferredOutPartyOrgName }}</el-descriptions-item>
      <el-descriptions-item label="转入事由">{{ form.reasonForTransfer }}</el-descriptions-item>
    </el-descriptions>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close">关闭</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  data () {
    return {
      dialogVisible: false,
      form: {},
      typeList: ['转入', '转出至系统内其他党组织', '转出至系统外党组织']
    }
  },
  methods: {
    open (row) {
      this.form = { ...row }
      this.dialogVisible = true
    },
    close () {
      this.form = {}
      this.dialogVisible = false
    }
  }
}
</script>
<style lang="scss" scoped>
  .titleStyle {
    font-weight: 600;
    height: 35px;
    line-height: 35px;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 8px;
    background-color: #d8eff9;
    display: flex;
    justify-content: space-between;
  }
</style>
